<%-- 
    Document   : N950
    Created on : Oct 24, 2012, 4:07:06 PM
    Author     : Nguyen Hung
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript">
            $j(document).ready(function(){   
                var open_cur = 0;
                $j = jQuery.noConflict();
                $j('#itemsc').easyPaginate({
                    step:1
                });
              
                $j(".saveT025").live("click",function(){
                      var tv026 = $j('#T205FORM\\:TV').val();
                    
                    TV027 = $j(this).parent(".popup-footer").parent(".groupaccount").parent(".itemcontent").find(".TV027").val();//dia chi
                    
                    TV028 = $j(this).parent(".popup-footer").parent(".groupaccount").parent(".itemcontent").find(".TV028").children("option:selected").val();//dia chi
                    TV029 = $j(this).parent(".popup-footer").parent(".groupaccount").parent(".itemcontent").find(".TV029").val();//dia chi
                    TV030 = $j(this).parent(".popup-footer").parent(".groupaccount").parent(".itemcontent").find(".TV030").val();//dia chi
                    PT025 = $j(this).attr("lang");
                    fn100 = $j(this).parent(".popup-footer").attr("lang");
                    showPleaseWait();
                    $j.post("postAjaxT025.jsp?action=updateajaxT025&TV027="+TV027+"&TV028="+TV028+"&TV029="+TV029+"&TV030="+TV030+"&PT025="+PT025+"&pn100="+fn100+"&tv026="+tv026,function(data){
                        if(data != null){
                            $j(".mesage").text("Cập nhật thành công");
                            hidePleaseWait();
                        }
                    });
                });
                $j(".pageindex").live("click",function(){
                    $j(".mesage").text("");
                });
            });
        </script>
       
        <style type="text/css">
            a, a:visited{
                text-decoration:none;
                color:#06C;
            }
            a:hover{color:#999;}

            /* base */

            /* content */

            ul#items{		
                margin:0;
                height:120px;
                width:auto;
                overflow:hidden;
                list-style:none !important;
            }
            ul#items li{
                list-style:none !important;
                float:left;
                width:200px;
                height:120px;
                overflow:hidden;
                margin:0 0 0 1px;
                background:#999;
                color:#fff;
                text-align:center;
            }
            ol#pagination{
                float: left;
                margin: -27px 2px 2px;
                overflow: hidden;
                width: 200px;
            }
            ol#pagination li{
                border: 1px solid gray;
                cursor: pointer;
                float: left;
                height: 11px;
                list-style: none outside none !important;
                margin-left: 5px;
                padding: 2px 9px 5px;
                position: inherit;
                width: 5px;
            }
            ol#pagination li.current{color:#f00;font-weight:bold;}
            li {
                list-style:none !important;
            }
            .message{
                color: red;
                float: left;
                text-align: center;
                margin-top: 16px;
                font-weight:bold; 
            }
            .db1{
                text-align:right;
                width:199px;
                margin-left:-50px;
            }
            /* // content */
        </style>

    </head>
    <body>
        <f:view>
            <a4j:form id="T205FORM">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                <h:panelGroup rendered="#{t025Controller.render == 0}">
                    <div style="float:left; width:50%;">
                        <div class="fields_input">
                            <label style="text-align:left; margin-left:21px"><h:outputText value="#{locale.bank_acc_num}"/>*:</label>
                            <h:inputText value="#{t025Controller.TV027}" id="code1"   style="" styleClass="required db db1" />

                        </div>

                        <div class="fields_input">
                            <label style="text-align:right; margin-left:27px; width:70px;"><h:outputText value="#{locale.currency}"/>:</label>
                            <h:selectOneMenu id="comboboxn5501" value="#{t025Controller.TV028}"  styleClass="combobox" style="width:90px; float: left;margin-left:4px;">                                      
                                <f:selectItem itemValue="VND"  itemLabel="VND"/>       
                                <f:selectItem itemValue="USD"  itemLabel="USD"/>                                        
                                <f:selectItem itemValue="EUR"  itemLabel="EUR"/>
                            </h:selectOneMenu>
                        </div>

                    </div>
                    <div style="float:left; width:50%;">

                        <div class="fields_input">
                            <label style="text-align:left; margin-left:19px; width:75px;"><h:outputText value="#{locale.bank}"/> <span>*:</span></label>
                            <h:inputText value="#{t025Controller.TV029}" styleClass="required" id="cusname1" style="width:210px; margin-left:1px;" />

                        </div>

                        <div class="fields_input">
                            <label style="text-align:right; margin-left:21px; width:70px;"><h:outputText value="#{locale.address}"/>:</label>
                            <h:inputText value="#{t025Controller.TV030}" id="contact1" style="width:210px; margin-left:4px;" />
                        </div>
                    </div>
                    <h:panelGroup id="account">
                        <div class="popup-footer" style="height:40px;">
                            <h:outputText value="#{t025Controller.messageform}" id="mesage5" styleClass="message"/>

                            <h:inputHidden id="REFID" value="#{t025Controller.REFID}"/>
                           
                            <h:inputHidden id="page" value="#{t025Controller.pagereload}"/>
                            <h:inputHidden id="PT" value="#{t025Controller.PT025}"/>
                            <a4j:commandButton  value='#{locale.save}' actionListener="#{t025Controller.updateT025}"
                                                onclick=" showPleaseWait();"
                                                oncomplete="hidePleaseWait();" style="margin-right:55px;"
                                                styleClass="buttonsave" reRender="mesage5" >

                            </a4j:commandButton>
                        </div>
                    </h:panelGroup>
                </h:panelGroup>
                <h:panelGroup rendered="#{t025Controller.listAjaxT025Bean!= null}">
                    <div id="itemsc">
                        <a4j:repeat  value="#{t025Controller.listAjaxT025Bean}" var="item">  
                            <li>
                                <div class="itemcontent">
                                    <div style="float:left; width:50%;">
                                        <div class="fields_input">
                                            <label style="text-align:left; margin-left:21px"><h:outputText value="#{locale.bank_acc_num}"/>*:</label>
                                            <h:inputText value="#{item.TV027}" id="code1"   style="" lang="16" styleClass="required maxlength db db1 TV027" />

                                        </div>

                                        <div class="fields_input">
                                            <label style="text-align:right; margin-left:27px; width:70px;"><h:outputText value="#{locale.currency}"/>:</label>
                                            <h:selectOneMenu id="comboboxn5501" value="#{item.TV028}"  styleClass="combobox TV028" style="width:90px; float: left;margin-left:4px;">                                      
                                                <f:selectItem itemValue="VND"  itemLabel="VND"/>       
                                                <f:selectItem itemValue="USD"  itemLabel="USD"/>                                        
                                                <f:selectItem itemValue="EUR"  itemLabel="EUR"/>
                                            </h:selectOneMenu>
                                        </div>

                                    </div>
                                    <div style="float:left; width:50%;">

                                        <div class="fields_input">
                                            <label style="text-align:left; margin-left:19px; width:75px;"><h:outputText value="#{locale.bank}"/> <span>*:</span></label>
                                            <h:inputText value="#{item.TV029}" styleClass="required TV029" id="cusname1" style="width:210px; margin-left:1px;" />

                                        </div>

                                        <div class="fields_input">
                                            <label style="text-align:right; margin-left:21px; width:70px;"><h:outputText value="#{locale.address}"/>:</label>
                                            <h:inputText value="#{item.TV030}" id="contact1" style="width:210px; margin-left:4px;" styleClass="TV030" />
                                        </div>
                                    </div>
                                    <h:panelGroup id="account" styleClass="groupaccount">
                                        <%--    <div class="popup-footer" style="height:40px;">
                                      
                                           <h:outputText value="#{t025Controller.messageform}" id="mesage5" styleClass="message"/>

                                            <h:inputHidden id="REFID" value="#{t025Controller.REFID}"/>
                                            <h:inputHidden id="TV" value="#{t025Controller.TV026}"/>
                                            <h:inputHidden id="page" value="#{t025Controller.pagereload}"/>
                                            <h:inputHidden id="PT" value="#{t025Controller.PT025}"/>
                                            <a4j:commandButton  value='#{locale.save}' actionListener="#{t025Controller.updateT025}"
                                                                onclick=" showPleaseWait();"
                                                                oncomplete="hidePleaseWait();" style="margin-right:55px;"
                                                                styleClass="buttonsave" reRender="mesage5" >

                                            </a4j:commandButton>
                                        </div>--%>
                                        <div class="popup-footer" lang="<h:outputText value="#{t025Controller.REFID}"/>">

                                            <h:outputText value="#{t025Controller.messageform}" id="mesage" styleClass="mesage"/>
                                            <div  class="buttonsave saveT025" lang="<h:outputText value="#{item.PT025}"/>">
                                                <h:outputText value='#{locale.save}' style="float:left;margin-left: 22px;"/>
                                            </div>    
                                        </div>
                                    </h:panelGroup>
                                </div>
                            </li>
                        </a4j:repeat>
                    </div>

                </h:panelGroup>
                 <h:inputHidden id="TV" value="#{t025Controller.TV026}"/>
            </a4j:form>
        </f:view>


    </body>
</html>
